-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polyfill Vue Test Utils 2 API #8103
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
ade8376
to
34a2e02
Compare
Results for oCISFiles3 https://drone.owncloud.com/owncloud/web/30647/58/1 |
Results for oC10SharingExternalRoot https://drone.owncloud.com/owncloud/web/30647/43/1 |
Results for oC10SharingExternal https://drone.owncloud.com/owncloud/web/30647/42/1 |
Results for oC10FileFolderOperations https://drone.owncloud.com/owncloud/web/30647/14/1 |
Results for oC10RenameFileFolder https://drone.owncloud.com/owncloud/web/30647/15/1 |
packages/web-app-files/tests/unit/components/FilesList/ResourceTable.spec.ts
Outdated
Show resolved
Hide resolved
46f0179
to
06aa74a
Compare
packages/web-runtime/tests/unit/components/SidebarNav/SidebarNav.spec.ts
Outdated
Show resolved
Hide resolved
packages/web-app-user-management/tests/unit/components/Users/DeleteUserModal.spec.ts
Outdated
Show resolved
Hide resolved
packages/web-app-user-management/tests/unit/components/Groups/DeleteGroupModal.spec.ts
Outdated
Show resolved
Hide resolved
Tests are not run from their respective packages, so we do not need to depend on web-test-helpers in the packages (and especially not in runtime deps)
The test is imho more expressive if we check the value passed into the component is actually used instead of just returning a placeholder from a mock.
Same reasoning as for DeleteUserModal before: test is more expressive when the output actually differs based on the input
55d606e
to
d248ae2
Compare
Kudos, SonarCloud Quality Gate passed! |
describe('FileInfo', () => { | ||
it('shows file info', () => { | ||
const { wrapper } = createWrapper() | ||
// FIXME check for highlightedFile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a followup-fixme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test needs to be reworked in general, but that's a follow-up. The comment is not really telling that, yeah 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have proper words for this awesomeness. Good job guys, thank you! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR polyfills the new Vue Test Utils 2 Api which we need for Vue 3 (compat mode) and ports our tests to use them.
It gets rid of
vuex-mock-store
and basically also ofvuex-extensions
(but we left that one in at runtime, because we didn't want to risk any breaking change at runtime instable
)Related Issue
Motivation and Context
We want to switch to Vue 3 (compat mode) in master sooner or later. Adjusting our test suite first should keep the scope way more limited.
Doing this in the stable branch will help keeping tests in stable and merging them to master and will also make it much easier to maintain them for our stable release.
How Has This Been Tested?
just test changes
Screenshots (if appropriate):
Types of changes
Checklist:
Followup tasks:
vuex-extensions
completely